<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app">
    <login></login>
</div>



<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>

    const login={
        template: "<div><h1>123456{{msg}}</h1><ul><li v-for='item,index in lists'>{{index}}  {{item}}</li></ul></div>",
        //定义组件自己的数据
        data(){
            return {msg: "hello",
                lists:['java','spring','html']}

        }
    }

    const app =new Vue(
        {
            el:"#app",
            data:{},
            methods:{},
            components:{
                login
            }
        }
    )
</script>
</body>
</html>